package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import com.hnluchuan.staff.model.Employee;

/**
 * 家庭成员
 */
@Entity
@Table(name = "family") 
public class Family extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Family() {
	}
	
	public Family(Long id) {
		this.faid = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long faid;
	/**
	 * 员工ID
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_id")
	private Employee employee;
	/**
	 * 姓名
	 */
	@Column(name = "name")    		
	private String faname;
	/**
	 * 关系
	 */
	@Column(name = "relation")    		
	private String farelation;
	/**
	 * 联系方式
	 */
	@Column(name = "contact")    		
	private String contact;
	/**
	 * 年龄
	 */
	@Column(name = "age")    		
	private Integer age;
	/**
	 * 工作单位
	 */
	@Column(name = "company")    		
	private String facompany;
	/**
	 * 职位
	 */
	@Column(name = "position")    		
	private String position2;

	private Boolean deleted;
	// fields end
	

	/** 员工ID */
	public Employee getEmployee() {
    	return employee;
    }
    /** 员工ID */
    public void setEmployee(Employee employee) {
    	this.employee = employee;
    }


	/** 联系方式 */
	public String getContact() {
    	return contact;
    }
    /** 联系方式 */
    public void setContact(String contact) {
    	this.contact = contact;
    }
	/** 年龄 */
	public Integer getAge() {
    	return age;
    }
    /** 年龄 */
    public void setAge(Integer age) {
    	this.age = age;
    }



	public String getPosition2() {
		return position2;
	}

	public void setPosition2(String position2) {
		this.position2 = position2;
	}

	public String getFaname() {
		return faname;
	}

	public void setFaname(String faname) {
		this.faname = faname;
	}

	public String getFarelation() {
		return farelation;
	}

	public void setFarelation(String farelation) {
		this.farelation = farelation;
	}

	public String getFacompany() {
		return facompany;
	}

	public void setFacompany(String facompany) {
		this.facompany = facompany;
	}

	public Long getFaid() {
		return faid;
	}

	public void setFaid(Long faid) {
		this.faid = faid;
	}

	public Boolean getDeleted() {
		return deleted;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}
}
